package org.activequant.calendar;

import java.util.TimeZone;

import org.activequant.core.types.Exchange;

public class NASDAQCalendarSettings implements IExchangeCalendarSettings {
	private static final NASDAQCalendarSettings NASDAQCalendarSettings = new NASDAQCalendarSettings();
	private static final Exchange EXCHANGE = Exchange.XNMS;
	public static final String TimeZoneID="GMT-4:00";
	private static final TimeZone TIMEZONE = TimeZone.getTimeZone(TimeZoneID);//"GMT-5:00"
	private static final long OPENING = ((9 * 3600L) +1800L) * 1000L;
	private static final long CLOSE = 16 * 3600L * 1000L;
//	private static final long OPENING = ((0 * 3600L) +1800L) * 1000L;
//	private static final long CLOSE = 23 * 3600L * 1000L;
	/**
	 * Gets a instance for the NASDAQ calendar settings.<br/>
	 * returns the associated NASDAQCalendarSettings(NASDAQCalendarSettings)
	 * @return the instance for the settings.
	 */
	public static synchronized NASDAQCalendarSettings getInstance() {
		return NASDAQCalendarSettings;
	}
	/**
	 * an empty private NASDAQCalendarSettings (implements IExchangeCalendarSettings) constructor
	 */
	private NASDAQCalendarSettings() {
		// Instantiation not allowed
	}

	public TimeZone getTimeZone() {
		return TIMEZONE;
	}

	public long getRegularOpeningTime() {
		return OPENING;
	}

	public long getRegularClosingTime() {
		return CLOSE;
	}

	public Exchange getExchange() {
		return EXCHANGE;
	}
}
